//
//  ZZWorkBenefitRankCell.m
//  新项目
//
//  Created by liGordon on 17/3/13.
//  Copyright © 2017年 刘耀宗. All rights reserved.
//

#import "ZZWorkBenefitRankCell.h"
@interface ZZWorkBenefitRankCell ()
@property (weak, nonatomic) IBOutlet UILabel *recommendLabel;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *carPlate;
@property (weak, nonatomic) IBOutlet UILabel *carType;
@property (weak, nonatomic) IBOutlet UIView *lineView;
@end
@implementation ZZWorkBenefitRankCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setDic:(NSDictionary *)dic
{
    _dic = dic;
    self.recommendLabel.text = [NSString stringWithFormat:@"%@",dic[@"TypeOfWork"]];
    [self.recommendLabel sizeToFit];
    
    if ([UIScreen mainScreen].bounds.size.width <= 320) {
        self.nameLabel.text = [NSString stringWithFormat:@"主修人:%@",dic[@"Major"]];
        [self.nameLabel sizeToFit];
        
        self.carPlate.text = [NSString stringWithFormat:@"工时费:¥%@",dic[@"WorkHoursMoney"]];
        [self.carPlate sizeToFit];
        [self.carType setHidden:YES];
        [self.lineView setHidden:YES];
    }else{
        self.nameLabel.text = [NSString stringWithFormat:@"主修人:%@",dic[@"Major"]];
        [self.nameLabel sizeToFit];
        
        self.carPlate.text = [NSString stringWithFormat:@"工时费:¥%@",dic[@"WorkHoursMoney"]];
        [self.carPlate sizeToFit];
        self.carType.text = [NSString stringWithFormat:@"提成金额:¥%.3f",[dic[@"RoyaltyAmount"]floatValue]];
    }

    
}


- (IBAction)moreBtnClick:(UIButton *)sender {
    if ([self.delegate respondsToSelector:@selector(clickDetail)]) {
        [self.delegate clickDetail];
    }
    
}


@end
